//
//  RHProductCell.m
//  RuiHeAppApp
//
//  Created by Yan Chen on 2023/8/18.
//

#import "RHProductCell.h"

@interface RHProductCell()





@end
@implementation RHProductCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if(self = [super initWithFrame:frame]){
        [self setupUI];
    }
    return self;
}
-(void)setupUI{
    self.contentView.backgroundColor = CFTabViewBgColor;
    self.contentView.layer.cornerRadius = 8;
    self.contentView.layer.masksToBounds = YES;
    
    UIView *bgView = kView;
    [self.contentView addSubview:bgView];
    bgView.layer.cornerRadius = 8;
    bgView.layer.masksToBounds = YES;
    
    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.insets(UIEdgeInsetsZero);
    }];
    
    _titleLab = [[QMUILabel alloc]init];
    [bgView addSubview:_titleLab];
    _titleLab.text = @"产品类型".rh_localized;
    _titleLab.textColor = kCOLOR_HEX(@"3F4443");
    _titleLab.font = [UIFont systemFontOfSize:14];
    
    [_titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.top.mas_offset(15);
    }];
    
    _productImg = [[UIImageView alloc]init];
    [bgView addSubview:_productImg];
    _productImg.image = [UIImage imageNamed:@"product01"];
    _productImg.contentMode = UIViewContentModeScaleAspectFill;
    _productImg.layer.cornerRadius = 8;
    _productImg.layer.masksToBounds = YES;
    kWeakSelf;
    [_productImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(weakSelf.titleLab.mas_bottom).offset(10);
            make.left.mas_offset(15);
            make.right.mas_offset(-15);
            make.bottom.mas_offset(-15);
    }];
}

@end
